USE [DeltaFlex]
GO

IF (OBJECT_ID('dbo.CONCEPTE_ALBARA')) IS NOT NULL
	DROP TABLE dbo.CONCEPTE_ALBARA
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
 
CREATE TABLE CONCEPTE_ALBARA(
	IDCONCEPTE_ALBARA int NOT NULL,
	IDALBARA int NOT NULL,
	IDARTICLE int NOT NULL,
	QUANTITAT decimal(8,4) NOT NULL,
	STRSUPERFICIE varchar(50) NOT NULL,
	DECIMALSUPERFICIE decimal(8,4) NOT NULL,
	UNITATS varchar(5) NOT NULL,
	PVP decimal(8,4) NOT NULL,
	IMPORT decimal(8,4) NOT NULL
	
 CONSTRAINT PK_CONCEPTE_ALBARA PRIMARY KEY CLUSTERED 
(
	IDCONCEPTE_ALBARA ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

IF (OBJECT_ID('SEQ_CONCEPTE_ALBARA')IS NOT NULL)
	DROP SEQUENCE SEQ_CONCEPTE_ALBARA
GO

CREATE SEQUENCE SEQ_CONCEPTE_ALBARA
	START WITH 1
    INCREMENT BY 1
    MINVALUE 1
    MAXVALUE 9223372036854775807;

GO

